using System;
using System.Collections.Generic;
using System.Text;

namespace StudentManagementApplication.Business
{
    public class LoginService
    {
        private DAO.LoginDAO loginDAO = new DAO.LoginDAO();

        public void InsertAccount(Entities.Login login)
        {
            loginDAO.InsertAccount(login);
        }

        public void UpdateAccount(Entities.Login login)
        {
            loginDAO.UpdateAccount(login);
        }

        public void UpdatePasswordOfAccount(Entities.Login login)
        {
            loginDAO.UpdatePasswordOfAccount(login);
        }

        public void DeleteAccount(string sLoginID)
        {
            loginDAO.DeleteAccount(sLoginID);
        }

        public Entities.Login GetAccountByLoginID(string sLoginID)
        {
            return loginDAO.GetAccountByLoginID(sLoginID);
        }

        public Entities.Login GetAccountByLoginIDAndPassword(string sLoginID,string sPassword)
        {
            return loginDAO.GetAccountByLoginIDAndPassword(sLoginID, sPassword);
        }

        public List<Entities.Login> GetAllAccounts()
        {
            return loginDAO.GetAllAccounts();
        }
    }
}
